/*
 * Copyright 2025 The JA-SIG Collaborative. All rights reserved.
 * distributed with this file and available online at
 */
package com.lap.auth.application.organization.command;

import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Size;
import java.util.List;
import lombok.Data;
import org.hibernate.validator.constraints.Length;
import org.hibernate.validator.constraints.Range;

@Data
@Schema(description = "创建组织架构命令")
public class CreateOrgCmd {

  @Size(max = 256, message = "{organization.pidPath.max.length}")
  @Schema(description = "上级组织")
  private List<Integer> pidPaths;

  @Length(max = 64, message = "{organization.code.max.length}")
  @Schema(description = "组织编码")
  private String code;

  @NotBlank(message = "{organization.name.required}")
  @Length(max = 32, message = "{organization.name.max.length}")
  @Schema(description = "组织名称")
  private String name;

  @NotNull(message = "{organization.status.required}")
  @Range(min = -127, max = 128, message = "{organization.status.range}")
  @Schema(description = "组织状态:0-禁用,1-启用")
  private Integer status;

  @Length(max = 64, message = "{organization.remark.max.length}")
  @Schema(description = "部门备注")
  private String remark;

  @NotNull(message = "{organization.sortOrder.required}")
  @Range(min = 0, max = 2147483647, message = "{organization.sortOrder.range}")
  @Schema(description = "排序")
  private Integer sortOrder;
}
